package com.battery.service;

import com.battery.pojo.Device;
import com.battery.pojo.Order;
import com.battery.util.result.Result;
import io.netty.channel.ChannelHandlerContext;

import java.util.HashMap;

public interface DeviceService {
    Result addDevice(Device device);

    Result queryAllDevice();

    Result updateDevice(Device device);

    Result updateDevice(HashMap hashMap);

    Result getDeviceByKey(String key);

    Result getDeviceById(int id);

    Result deviceLogin(HashMap hashMap, ChannelHandlerContext ctx);

    Result lentBattery(Order order);

    Result updateOrder(HashMap<String, String> hashMap);

    Result returnBattery(HashMap<String, String> hashMap);


    Result popBattery(int slot, int deviceId);

    Result popupConfirm(HashMap<String, String> hashMap);
}
